<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<!-- head 头部-->
<head th:replace="admin/layout/include::head('Javabb门户系统管理','')"></head>

<body class="layui-layout-body">

    <div class="layui-layout layui-layout-admin">

        <!-- 头部 start -->
        <div class="layui-header">
            <div class="layui-logo">
                <img src="/assets/images/logo.png"/>
                <cite>&nbsp;Javabb论坛后台</cite>
            </div>
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item" lay-unselect>
                    <a ew-event="flexible" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>
                </li>
                <li class="layui-nav-item" lay-unselect>
                    <a ew-event="refresh" title="刷新"><i class="layui-icon layui-icon-refresh-3"></i></a>
                </li>
            </ul>
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item" lay-unselect>
                    <a ew-event="message" data-url="/home/message" title="消息">
                        <i class="layui-icon layui-icon-notice"></i>
                        <span class="layui-badge-dot"></span><!--小红点-->
                    </a>
                </li>
                <li class="layui-nav-item" lay-unselect>
                    <a ew-event="note" title="便签" data-url="/home/note"><i class="layui-icon layui-icon-note"></i></a>
                </li>
                <li class="layui-nav-item layui-hide-xs" lay-unselect>
                    <a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i></a>
                </li>
                <li class="layui-nav-item" lay-unselect>
                    <a>
                        <img th:src="${thUtil.formatUserImage(currentUser.userImg)}" class="layui-nav-img">
                        <cite th:text="${currentUser.nickName}">管理员</cite>
                    </a>
                    <dl class="layui-nav-child">
                        <dd lay-unselect>
                            <a ew-href="/user/userConfig">个人中心</a>
                        </dd>
                        <dd lay-unselect>
                            <a ew-event="psw" data-url="/home/password">修改密码</a>
                        </dd>
                        <hr>
                        <dd lay-unselect>
                            <a ew-event="logout" data-url="/admin/logout">退出</a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item" lay-unselect>
                    <a ew-event="theme" title="主题" data-url="/home/theme"><i class="layui-icon layui-icon-more-vertical"></i></a>
                </li>
            </ul>
        </div>
        <!--      header end      -->
        <!--   侧边栏   -->
        <div class="layui-side">
            <div class="layui-side-scroll">
                <ul class="layui-nav layui-nav-tree arrow2" lay-accordion="true" lay-filter="admin-side-nav" style="margin-top: 15px;">
                    <li class="layui-nav-item">
                        <a><i class="layui-icon layui-icon-home"></i>&emsp;<cite>主页</cite></a>
                        <dl class="layui-nav-child">
                            <dd>
                                <a lay-href="/home/welcome">主页</a>
                            </dd>
                            <dd>
                                <a lay-href="/home/console">控制台</a>
                            </dd>
                        </dl>
                    </li>

                    <li class="layui-nav-item" th:each="menu:${menus}">
                        <a><i th:class="'layui-icon '+${menu.menuIcon}"></i>&emsp;<cite th:text="${menu.menuName}">菜单</cite></a>
                        <dl class="layui-nav-child" th:if="${not #lists.isEmpty(menu.subMenus)}">
                            <dd th:each="subMenu:${menu.subMenus}">
                                <a th:attr="lay-href=${subMenu.menuUrl}" th:text="${subMenu.menuName}">菜单</a>
                                <dl class="layui-nav-child" th:if="${not #lists.isEmpty(subMenu.subMenus)}">
                                    <dd th:each="temp:${subMenu.subMenus}">
                                        <a th:attr="lay-href=${temp.navUrl}" th:text="${temp.navName}">菜单</a>
                                    </dd>
                                </dl>
                            </dd>
                        </dl>
                    </li>

                    <li class="layui-nav-item">
                        <a><i class="layui-icon layui-icon-senior"></i>&emsp;<cite>系统监控</cite></a>
                        <dl class="layui-nav-child">
                            <dd><a lay-href="/druid/">Druid监控</a></dd>
                        </dl>
                    </li>

                    <!--<li class="layui-nav-item">
                        <a><i class="layui-icon layui-icon-unlink"></i>&emsp;<cite>多级菜单</cite></a>
                        <dl class="layui-nav-child">
                            <dd>
                                <a>二级菜单</a>
                                <dl class="layui-nav-child">
                                    <dd><a>三级菜单</a></dd>
                                    <dd><a>三级菜单</a></dd>
                                </dl>
                            </dd>
                        </dl>
                    </li>

                    <li class="layui-nav-item">
                        <a><i class="layui-icon layui-icon-unlink"></i>&emsp;<cite>一级菜单</cite></a>
                    </li>-->
                </ul>
            </div>
        </div>
        <!--      side end      -->
        <!-- 主体部分 -->
        <div class="layui-body"></div>

        <!-- 底部 -->
        <div class="layui-footer">
            copyright © 2019 portal.javabb.cn all rights reserved. <span class="pull-right">Version 1.0.0</span>
        </div>
    </div>

    <!-- 加载动画 -->
    <!-- loading 动画-->
    <div th:replace="admin/layout/include::loading"></div>

<!-- js部分 -->
    <div th:replace="admin/layout/include::js"></div>
</body>
<script>
    layui.use(['index'], function () {
        var $ = layui.jquery;
        var index = layui.index;

        // 默认加载主页
        index.loadHome({
            menuPath: '/home/welcome',
            menuName: '<i class="layui-icon layui-icon-home"></i>'
        });

    });
    /*layui.use(['layer', 'element', 'admin', 'index'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var admin = layui.admin;
        var index = layui.index;

        index.loadSetting();  // 加载本地缓存的设置属性

        // 默认加载主页
        index.loadView({
            navPath: '/home/console',
            navName: '<i class="layui-icon layui-icon-home"></i>'
        });

        // 消息点击事件
        $('#btnMessage').click(function () {
            admin.popupRight({
                type: 2,
                content: '/home/message'
            });
        });

        // 修改密码点击事件
        $('#setPsw').click(function () {
            admin.open({
                type: 2,
                title: '修改密码',
                shade: 0,
                content: '/home/password'
            });
        });

        // 退出登录点击事件
        $('#btnLogout').click(function () {
            layer.confirm('确定退出登录？', function () {
                location.replace('login.html');
            });
        });

        // 个人信息点击事件
        $('#setInfo').click(function () {

        });

    });*/
</script>
</html>